package com.liuyjy.core.exception;


import com.liuyjy.core.service.ResultCodeInterface;

/**
 * <p>
 * Title: 控制类异常
 * </p>
 */

public class AppException extends BaseException {

    /**
     *
     */
    private static final long serialVersionUID = 1412104290896291466L;

    /**
     * 通用
     *
     * @param enumService code
     */
    public AppException(ResultCodeInterface enumService, String message) {
        super(enumService.getCode(), enumService.getMsg() + ":" + message);
    }

    public AppException(ResultCodeInterface enumService) {
        super(enumService.getCode(), enumService.getMsg());
    }

    public AppException(String msg) {
        super("500", msg);
    }

    public AppException(Exception e) {
        this(e.getMessage());
    }

    public AppException(String msg, Throwable e) {
        super(msg, e);
    }

    public AppException(String code, String message) {
        super(code, message);
    }


    public AppException(String code, String message, Throwable e) {
        super(code, message, e);
    }
}
